#include<bits/stdc++.h>
using namespace std;
int f[100005],a[100005];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    int cnt=0,s=0,l=0;
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>f[i];
        a[f[i]]++;
    }
    for(int i=1;i<=100005;i++){
        cnt+=a[i];
        if(a[i]!=0){
           l++;
           if(l==1)s=a[i];
           else {cnt-=min(a[i],s);s=a[i];}
        }
    }
    cout<<cnt;
    return 0;
}
